const { LocalStorage } = require('node-localstorage');
const localStorage = new LocalStorage('./scratch');

// 检查作业数据
console.log('检查localStorage中的作业数据:');
const jobs = localStorage.getItem('ai_platform_jobs');
if (jobs) {
  const parsed = JSON.parse(jobs);
  console.log('作业数量:', parsed.length);
  console.log('作业列表:');
  parsed.forEach((job, index) => {
    console.log(`${index + 1}. ID: ${job.id}, 类型: ${job.type}, 状态: ${job.status}, 名称: ${job.name}`);
  });
} else {
  console.log('未找到作业数据');
}

// 检查特征任务数据
console.log('\n检查localStorage中的特征任务数据:');
const featureTasks = localStorage.getItem('ai_platform_feature_tasks');
if (featureTasks) {
  const parsed = JSON.parse(featureTasks);
  console.log('特征任务数量:', parsed.length);
  console.log('特征任务列表:');
  parsed.forEach((task, index) => {
    console.log(`${index + 1}. ID: ${task.id}, 类型: ${task.type}, 状态: ${task.status}, 名称: ${task.name}`);
  });
} else {
  console.log('未找到特征任务数据');
}